﻿// ------------------------------------------------------------------------------
// <copyright file="XamlMetadataProvider.cs" company="skumaronline.com">
//    Copyright (C) 2012 Suresh Kumar T.  All rights reserved.
// </copyright>
// ------------------------------------------------------------------------------

namespace StoreAppLib.MetaData
{
    using System;
    using Windows.UI.Xaml.Markup;

    /// <summary>
    /// XAML meta data provider
    /// </summary>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks", "4.0.0.0")]
    [System.Diagnostics.DebuggerNonUserCodeAttribute]
    public sealed class XamlMetadataProvider : IXamlMetadataProvider
    {
        /// <summary>
        /// Implements XAML schema context access to underlying type mapping, based on specifying a full type name
        /// </summary>
        /// <param name="fullName">The name of the class for which to return a XAML type mapping</param>
        /// <returns>The schema context's implementation of the XAML Type concept</returns>
        public IXamlType GetXamlType(string fullName)
        {
            return XamlTypeInfoProvider.Instance.GetXamlTypeByName(fullName);
        }

        /// <summary>
        /// Implements XAML schema context access to underlying type mapping, based on specifying a type
        /// </summary>
        /// <param name="type">The type of the class for which to return a XAML type mapping</param>
        /// <returns>The schema context's implementation of the XAML Type concept</returns>
        public IXamlType GetXamlType(Type type)
        {
            return XamlTypeInfoProvider.Instance.GetXamlTypeByType(type);
        }

        /// <summary>
        /// Gets the set of XMLNS (XAML namespace) definitions that apply to the context
        /// </summary>
        /// <returns>The set of XMLNS (XAML namespace) definitions</returns>
        public XmlnsDefinition[] GetXmlnsDefinitions()
        {
            return new XmlnsDefinition[0];
        }
    }
}
